<html>
<head>
<title>Docs for page user.lib.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">User_library</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                                                                                                                                            
                              		  [ <a href="../classtrees_User_library.html" class="menu">class tree: User_library</a> ]
		  [ <a href="../elementindex_User_library.html" class="menu">index: User_library</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_default.html">default</a><br />
              <a href="../li_Database.html">Database</a><br />
              <a href="../li_Game_library.html">Game_library</a><br />
              <a href="../li_Main.html">Main</a><br />
              <a href="../li_Session_library.html">Session_library</a><br />
              <a href="../li_Table_library.html">Table_library</a><br />
              <a href="../li_User_library.html">User_library</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../User_library/_lib---user.lib.php.html">		user.lib.php
		</a><br>
	  </div><br />
      
      
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Procedural File: user.lib.php</h1>
Source Location: /lib/user.lib.php<br /><br />

<br>
<br>


<h2>Page Details:</h2>
This file holds the library functions for user.<br /><br /><br /><br />
<h4>Includes:</h4>
<div class="tags">
require_once(<a href="../Database/_lib---db.lib.php.html">"lib/db.lib.php"</a>) [line 10]<br />
</div>
<br /><br />
<br /><br />
<br />
  <hr />
	<a name="functionuser_add_new_user"></a>
	<h3>user_add_new_user <span class="smalllinenumber">[line 21]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>int|FALSE user_add_new_user(
string $username, string $md5pw, [bool $no_escape = FALSE])</code>
    </td></tr></table>
    </td></tr></table><br />

		Create a new user account.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td><strong>User ID</strong> on success, <strong>FALSE</strong> on failure.</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$username</b>&nbsp;&nbsp;</td>
        <td>Username of the new user.</td>
      </tr>
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$md5pw</b>&nbsp;&nbsp;</td>
        <td>Password of the new user (should be md5-ed).</td>
      </tr>
		      <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$no_escape</b>&nbsp;&nbsp;</td>
        <td>Indicate whether to escape the variables or not.</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functionuser_check_password"></a>
	<h3>user_check_password <span class="smalllinenumber">[line 90]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>bool user_check_password(
string $username, string $md5pw, [bool $no_escape = FALSE])</code>
    </td></tr></table>
    </td></tr></table><br />

		Check if the password of a user is correct.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td><strong>TRUE</strong> if correct, <strong>FALSE</strong> if not.</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$username</b>&nbsp;&nbsp;</td>
        <td>Username of the user.</td>
      </tr>
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$md5pw</b>&nbsp;&nbsp;</td>
        <td>Password of the user (should be md5-ed).</td>
      </tr>
		      <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$no_escape</b>&nbsp;&nbsp;</td>
        <td>Indicate whether to escape the variables or not.</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functionuser_get_points"></a>
	<h3>user_get_points <span class="smalllinenumber">[line 122]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>int|FALSE user_get_points(
int $user_id, int $game_id)</code>
    </td></tr></table>
    </td></tr></table><br />

		Get the points of a user<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td><strong>Points</strong> of user, <strong>FALSE</strong> if failed.</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">int&nbsp;&nbsp;</td>
        <td><b>$game_id</b>&nbsp;&nbsp;</td>
        <td>Game ID.</td>
      </tr>
		      <tr>
        <td class="type">int&nbsp;&nbsp;</td>
        <td><b>$user_id</b>&nbsp;&nbsp;</td>
        <td>User ID.</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>
  <hr />
	<a name="functionuser_is_exists"></a>
	<h3>user_is_exists <span class="smalllinenumber">[line 59]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>bool user_is_exists(
string $username, [bool $no_escape = FALSE])</code>
    </td></tr></table>
    </td></tr></table><br />

		Check whether a user name exists.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td><strong>TRUE</strong> if exists, <strong>FALSE</strong> if not.</td>
  </tr>
</table>
</div>
    <br /><br />
	
    		<h4>Parameters</h4>
    <table border="0" cellspacing="0" cellpadding="0">
		      <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$username</b>&nbsp;&nbsp;</td>
        <td>Username in question.</td>
      </tr>
		      <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$no_escape</b>&nbsp;&nbsp;</td>
        <td>Indicate whether to escape the variables or not.</td>
      </tr>
				</table>
    	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
	</div>

        <div class="credit">
		    <hr />
		    Documentation generated on Fri, 06 May 2011 03:43:25 +0000 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>